<div class="relative overflow-hidden bg-white py-16">
    <%= render AzimuttWeb.PartialsView, "_bg_dots.html" %>
    <div class="relative px-6 lg:px-8">
        <div class="mx-auto max-w-prose text-lg">
            <h1>
                <span class="block text-center text-lg font-semibold text-indigo-600">Use case for Azimutt:</span>
                <span class="mt-2 block text-center text-3xl font-bold leading-8 tracking-tight text-gray-900 sm:text-4xl"><%= @use_case.title %></span>
            </h1>
            <p class="mt-8 text-xl leading-8 text-gray-500">
                Documentation is one of the trickiest things, for many reasons, and Azimutt will not be your silver bullet about it.
                But still, it can be your <strong>best ally</strong>, allowing rich and contextual documentation.
            </p>
        </div>
        <div class="prose prose-lg prose-indigo mx-auto mt-6 text-gray-500">
            <ul role="list">
                <li><a href="#why-is-documentation-so-hard">Why is documentation so hard?</a></li>
                <li><a href="#what-can-azimutt-do-about-it">What can Azimutt do about it?</a></li>
                <li><a href="#a-practical-example">A practical example</a></li>
                <li><a href="#pushing-even-further">Pushing even further</a></li>
            </ul>

            <h2 id="why-is-documentation-so-hard">Why is documentation so hard?</h2>
            <p>
                As far as I can remember I always heard people complain about documentation.
                Either because they don't want to write it, they don't know what to put inside or how to structure it.
                Either because it doesn't exist, they can't find it, it's outdated, or it doesn't cover needed topics.
            </p>
            <p>
                Very few people can see some gratification in writing documentation, sometimes because it's just a side-contribution in their job, but probably also because the benefit of it is delayed (multiple months later) or even unknown (who and how much it benefited to).
                One exception is teams doing support, they leverage documentation to decrease their load. But for engineers, we often see this as a necessary task but without much value. And so we don't do it or do it badly.
            </p>
            <p>
                If you have found a useful piece of documentation recently, please take a few minutes to thank the author. This will be much appreciated 🤩
            </p>

            <h2 id="what-can-azimutt-do-about-it">What can Azimutt do about it?</h2>
            <p>
                Obviously, Azimutt won't write a good documentation for you.
                But it has a few features which should make this much easier for you when doing so, for your database.
                I believe that good documentation should be contextual: it gives the relevant information in the relevant way at the relevant place.
            </p>
            <p>
                And what's better than documenting your database tables and columns just on them?
                For this, Azimutt displays <strong>SQL comments</strong> and provides an additional <strong>notes</strong> feature.
                So if you already have documented your database with SQL comments, you will see them in Azimutt, and they will be formatted using markdown, in case you used it.
                Otherwise, notes are best as you can see and edit them directly inside Azimutt, making your documentation well alive and easily up to date.
                You can easily explain in details the use cases of tables and columns as well as how they should be used or what is important to take care of.
                It's also a very good place to explain your vocabulary or conventions.
            </p>
            <img src="/images/screenshots/sql-comments-and-notes.png" alt="SQL comments and notes" class="w-full rounded-lg">
            <p>
                But sometimes, you may need to explain things broader than just a column or table.
                That's why Azimutt also has <strong>memos</strong>. They are markdown texts in layouts you can place anywhere.
                This is a great way to create some visual documentation, exploiting markdown capabilities:
            </p>
            <ul role="list">
                <li>use images for your logo, add highlights like arrows or some illustrations.</li>
                <li>use links for referencing other documentation or any relevant web page.</li>
                <li>use code and tables to give sample queries and show example results.</li>
                <li>use lists for TODOs or assign owners</li>
                <li>use memo color as convention, for feedback, ideas or improvements</li>
            </ul>
            <img src="/images/screenshots/memos.png" alt="Azimutt memos" class="w-full rounded-lg">
            <p>
                You can read more about them in our <a href="/blog/document-your-database-with-memos">detailed blog post</a> but clearly they are a game changer for database documentation.
            </p>
            <p>
                <strong>Layouts</strong> are also great for documenting. You can create dedicated layouts for explaining different parts of your database, showing only relevant tables and columns and highlighting what's important with memos.
                If an image is worth a thousand words, a good diagram also can be a powerful game changer.
                Use them to illustrate your words but also use cases, features or even team scope.
                Use a naming convention to keep them well organized, and you will be in a very good position to use your database the most efficiently.
            </p>
            <p>
                Last but not least, <strong>embedding</strong> your Azimutt diagrams will bring them everywhere, in the best possible context.
                The <a href="/blog/embed-your-database-diagram-anywhere">embed</a> has recently been augmented by <strong>private links</strong>, allowing you to create a token to share your diagram with anyone, and so the embed window. If you already have some online documentation, for example in confluence, notion or even docusaurus, it will be a great addition to add rich and interactive database diagrams.
            </p>
            <img src="/images/screenshots/private-link.png" alt="Azimutt private link" class="w-full rounded-lg">

            <h2 id="a-practical-example">A practical example</h2>
            <p>
                Here is a live example of an embedded diagram using a private link. It has some notes and memos but no SQL comment.
            </p>
            <iframe width="100%" height="450px" src="https://azimutt.app/embed?project-id=adbe859a-08c4-4386-9af3-be165b30e000&layout=documentation%20showcase&mode=layout&token=ec6ef23d-cd86-4521-955a-2ea1aedbf758" title="Embedded Azimutt diagram" frameborder="0" allowtransparency="true" allowfullscreen="true" scrolling="no" style="box-shadow: 0 2px 8px 0 rgba(63,69,81,0.16); border-radius:5px;"></iframe>

            <h2 id="pushing-even-further">Pushing even further</h2>
            <p>
                I believe with all this you are already quite well-equipped to document your database without too much trouble.
                Still a few improvements are planned and could be prioritized according to customer needs.
            </p>
            <p>
                First, <strong>updating SQL comments</strong> for sources with a database connection.
                This would make documentation sharing between tools much easier.
                But beware, updating a database if far from a trivial operation and I would advise to think twice before activating this once it's available.
            </p>
            <p>
                Second, adding <strong>tags</strong> to tables and columns could allow you to categorize and filter them.
            </p>
            <p>
                Also, adding some <strong>documentation history</strong> with author and dates to notes and memos will make them more relevant for projects on the long term or with many people.
            </p>
            <p>
                That's the obvious we have in mind but <a href="https://github.com/azimuttapp/azimutt/issues">feel free to suggest other ideas</a> to improve database documentation in Azimutt, even if probably not the most attractive feature to start, we believe this is an important and valuable one (and also one that is not solved at all for now 😉).
            </p>
        </div>
    </div>
</div>
<%= render "_footer.html", conn: @conn %>
